package basic.thread.again;

/**
 * 测试线程饥饿问题-->从线程优先级级别看
 * @author bingo
 * @create 2018-02-17 16:30
 **/
public class Demo6 implements Runnable{
    @Override
    public void run() {
        while (true){
            System.out.println(Thread.currentThread().getName());
        }
    }

    public static void main(String[] args) {
        Thread t1 = new Thread(new Demo6());
        Thread t2 = new Thread(new Demo6());
        t1.setPriority(10);
        t1.setPriority(1);
        t1.start();
        t2.start();
    }
}
